#include "../FileUtil.h"
#include <iostream>
#include <string>

using namespace BASE;

void displayStrings(Strings & strs){
	for(size_t i = 0; i < strs.size(); ++i){
		std::cout << strs.at(i) << std::endl;
	}
}

int main(){
	Strings strs = FileUtil::splitext("/home/public/test.txt");
	displayStrings(strs);
	std::cout << FileUtil::mkdirs("/home/public/test/test/test") << std::endl;	
	std::string path = "/home/public/wuyaobo/Git/net/libbase/test/test.txt"; 
	//std::cout << FileUtil::unlink(path) << std::endl;
	std::cout << FileUtil::getModifyTime(path) << std::endl;
	std::cout << FileUtil::getSize(path) << std::endl;
	std::cout << FileUtil::exist(path) << std::endl;
	std::cout << FileUtil::readAll(path) << std::endl;
	std::cout << FileUtil::writeAll(path, "other test") << std::endl;
	std::cout << FileUtil::readAll(path) << std::endl;
	std::cout << FileUtil::joinFileName(path, "join.txt") << std::endl;
	
	//std::cout << FileUtil::readAll(path) << std::endl;
	return 0;
}
